package com.freemyleft.left.left_app.mian.index.work.completecoures;

import com.freemyleft.left.left_app.R;
import com.freemyleft.left.left_app.mian.index.work.waitingforclass.adapter.WaitingForClassFiles;
import com.freemyleft.left.zapp.ui.recycler.MultipleItemEntity;
import com.freemyleft.left.zapp.ui.recycler.MultipleRecyclerAdapter;
import com.freemyleft.left.zapp.ui.recycler.MultipleViewHolder;

import java.util.List;

public class CompleteCourseAdapter extends MultipleRecyclerAdapter {
    public CompleteCourseAdapter(List<MultipleItemEntity> data) {
        super(data);
        addItemType(1, R.layout.item_waittingforclass);
    }

    @Override
    protected void convert(MultipleViewHolder holder, MultipleItemEntity entity) {
        super.convert(holder, entity);
        String date = entity.getField(WaitingForClassFiles.DATE);
        String student_message = entity.getField(WaitingForClassFiles.STUDENT_MESSAGE);
        String price = entity.getField(WaitingForClassFiles.PRICE);
        String location = entity.getField(WaitingForClassFiles.LOCATION);
        holder.setText(R.id.tv_date, date);
        holder.setText(R.id.tv_student_message, student_message);
        holder.setText(R.id.tv_price, price);
        holder.setText(R.id.tv_location, location);
    }
}
